package org.example.service.imp;

import org.example.mapper.EmpLogMapper;
import org.example.pojo.EmpLog;
import org.example.service.EmpLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Transactional(propagation = Propagation.REQUIRES_NEW)//需要在一个新事物中运行，其他事物会滚 当前事物不会回滚
@Service
public class EmpLogImp  implements EmpLogService {
    @Autowired
    EmpLogMapper empLogMapper;

    @Override
    public void insert(EmpLog empLog) {
        empLogMapper.insert(empLog);
    }
}
